//
//  Define.h
//  JWT
//
//  Created by Apple on 2017/1/1.
//  Copyright © 2017年 com.jwtsoft. All rights reserved.
//

#ifndef Define_h
#define Define_h


//定义分页刷新的条数
#define PageSize 30
//定义cell或者控件之间的间距
#define Cell_Margin 8
//imageView 默认的图片
#define ImageViewDefault @"jinwutuan_default"
//金武团 粉红主题色
#define HeaderBackground_Color RGB(250,2,200)
#define RGB_Red RGBa0xFFFFFF(0xf84545, 1)

#define RGB_DarkGray RGBa0xFFFFFF(0x364347, 1)
#define RGB_LightGray RGBa0xFFFFFF(0x93a4aa, 1)
//字体
#define Text_Font10 [UIFont systemFontOfSize:10.0f]
#define Text_Font11 [UIFont systemFontOfSize:11.0f]
#define Text_Font12 [UIFont systemFontOfSize:12.0f]
#define Text_Font13 [UIFont systemFontOfSize:13.0f]
#define Text_Font14 [UIFont systemFontOfSize:14.0f]
#define Text_Font15 [UIFont systemFontOfSize:15.0f]
#define Text_Font16 [UIFont systemFontOfSize:16.0f]

//
#define APPDELEGATE ((AppDelegate*)[[UIApplication sharedApplication]delegate])

//! 输出日志NSLOGJdd 这个函数只有在debuge模式下输出。
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...)
#endif

//屏幕320和大屏幕的比列
#define SCREEN_WIDTH320_REM    UISCREEN_WIDTH/320.0
#define rem(x) x*SCREEN_WIDTH320_REM

//单利对象申明,实现
#define SHARED_INSTANCE_DEFINE(className)   + (className *)sharedInstance;
#define SHARED_INSTANCE_IMPLEMENTATION(className) \
+ (className *)sharedInstance { \
static className *_ ## className = nil; \
if (!_ ## className) { \
_ ## className = [[className alloc] init]; \
} \
return _ ## className; \
}

//weakself
#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self

//设备物理大小
#define UISCREEN_WIDTH   [UIScreen mainScreen].bounds.size.width
#define UISCREEN_HEIGHT  [UIScreen mainScreen].bounds.size.height

// 获取RGBA颜色
#define RGBA(r,g,b,a) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a]
// 获取RGB颜色
#define RGB(r,g,b) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:1.0]

#define RGBa0xFFFFFF(rgbValue,a) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:a]

#define RGB_LightGrayBackGround RGBa0xFFFFFF(0xe1eef3, 1)
#define RGB_WhiteBackGround RGBa0xFFFFFF(0xffffff, 1)

//
#define iOS7 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)
#define iOS8 ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

//无网络
#define NET_CONNECT_TIMEOUT @"当前无网络"

//获取验证码
#define GetVerifyCode_Success @"验证码发送成功"

//注册
#define Regist_Success @"注册成功"
#define Regist_VerifyCodeError @"验证码错误"
#define Regist_VerifyCodeTimeOut @"验证码超时"

#endif /* Define_h */
